import Axios from '@/plugins/axios'
/**
 * 用户登录
 * @param username
 * @param password
 * @param captcha
 */
export const userLogin = ({ username, password, verificationCode }) => {
  return Axios({
    url: `/api/starday-auth/login/sys/account/${verificationCode}/login.do`,
    method: 'post',
    meta: {
      auth: false
    },
    data: {
      username,
      password
    }
  })
}
/**
 * 获取登录验证码
 */
export const queryVerificationCode = () => {
  return Axios({
    url: '/api/starday-auth/login/sys/captcha',
    method: 'post',
    meta: {
      auth: false
    }
  })
}

export const queryUserMenus = () => {
  return Axios({
    url: '/api/starday-system/sys/menu/nav',
    method: 'get',
    meta: {
      auth: true
    }
  })
}
